﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DisplayBoardInfo.Server.Session.MessageHandlers
{
    class AppointmentsHandler : MessageHandler
    {
        Network.Messages.Content.AppointmentArgs args;
        DataManager dm;

        public AppointmentsHandler(Network.Messages.Content.AppointmentArgs args, DataManager dm)
        {
            this.args = args;
            this.dm = dm;
        }

        public override Network.Messages.NetworkMessage GetResult()
        {
            IEnumerable<Network.Messages.Content.Appointment> output = dm.GetSpecyficAppointments(args);

            return new Network.Messages.NetworkMessage(Network.Messages.NetworkMessageTypes.Appointments, output);
        }
    }
}
